﻿@model Retete.Models.Vanzare
@{
    ViewBag.Title = "Vanzari";
}

<table style="width: 100%">
    <tr>
        <td style="width: 190px; vertical-align: top; border-right-style: dashed; border-right-color: #CFCFCF; border-right-width: 1px;">
        </td>
        <td style="vertical-align: top;">
            <fieldset>
                <legend>Produse vandute</legend>
            
                <table class="grid">
                    <thead>
                        <tr>
                            <th style="width: 70px">Cod</th>
                            <th>Produs</th>
                            <th style="width: 110px">Pret</th>
                            <th style="width: 110px">Portii</th>
                            <th style="width: 110px">Valoare</th>
                        </tr>
                    </thead>
        
                    <tbody id="tableBody">
                        @if (Model.ElementeVanzare != null)
                        {
                            for (int i = 0; i < Model.ElementeVanzare.Count; i++)
                            {
                                <tr>
                                    <td>@Model.ElementeVanzare.Skip(i).First().CodUnic</td>
                                    <td>@Model.ElementeVanzare.Skip(i).First().DenumireUnica</td>
                                    <td>@Model.ElementeVanzare.Skip(i).First().Pret.ToString("0.00")</td>
                                    <td>@Model.ElementeVanzare.Skip(i).First().Portii.ToString("0.00")</td>
                                    <td>@Model.ElementeVanzare.Skip(i).First().Valoare.ToString("0.00")</td>
                                </tr>
                            }
                        }
                        
                        <tr class="totals">
                            <td></td>
                            <td>Total:</td>
                            <td></td>
                            <td></td>
                            <td>@Model.Valoare.ToString("0.00")</td>
                        </tr>
                    </tbody>
                </table>
            </fieldset>
        </td>
    </tr>
</table>